﻿<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" CodeFile="Download.aspx.cs"
    Inherits="Manager_Download_Download" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table border="1" bordercolor="#407db3" cellpadding="2" cellspacing="2" class="tbl_Comon-Search"
        style="border-collapse: collapse" width="100%">
        <tr>
            <td align="center" colspan="1" rowspan="1" style="width: 30px" valign="top">
                <asp:Button ID="btnSearch" runat="server" CssClass="cssButton" Text="Tìm kiếm" OnClick="btnSearch_Click1" /></td>
            <td class="td_Title" nowrap="nowrap" style="width: 62px">
                <asp:Label ID="Label3" runat="server" CssClass="lbl_Common-Search" Text="Tiêu đề"></asp:Label></td>
            <td class="td_Control" nowrap="nowrap" style="width: 70%">
                <asp:TextBox ID="txtTenTheLoai" runat="server" Width="99%"></asp:TextBox></td>
        </tr>
        <tr>
            <td align="left" colspan="3" rowspan="1" valign="top">
                <asp:Button ID="btnAdd_Catalogue" runat="server" CssClass="cssButton" Text="Thêm mới"
                    OnClick="btnAdd_Catalogue_Click" /></td>
        </tr>
    </table>
    <br />
    <div align="center">
        <asp:GridView ID="grv_Master" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" DataKeyNames="IdD" Width="100%" CellPadding="2" BorderColor="#407db3"
            OnRowCreated="grv_Master_RowCreated" OnRowDataBound="grv_Master_RowDataBound"
            OnRowDeleting="grv_Master_RowDeleting" PageSize="20" OnPageIndexChanging="grv_Master_PageIndexChanging">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <img src='../../Images/Icon/cmdEdit.gif' border="0" alt="Edit" style="cursor: pointer"
                            onclick='hrUpdateCatalogue(this,<%# Eval("IdD") %>)' />
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="10px" />
                    <HeaderStyle CssClass="cssBorderGrv" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lblDelete" runat="server" CommandName="delete" Text="<img src=../../Images/Icon/cmdDelete.gif border=0 alt=Delete > "></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="10px" />
                    <HeaderStyle CssClass="cssBorderGrv" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Tiêu đề
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("TitleD") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="txtETenMn" runat="server" Text='<%# Eval("Title") %>' Width="95%"></asp:TextBox>
                    </EditItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Left" Width="95%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        Người cập nhập
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblUserNm" runat="server" Text='<%# Eval("UserNm") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="95%" />
                    <HeaderStyle CssClass="cssBorderGrv" HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField DataField="UpdDate" HeaderText="Ngày cập nhật" ItemStyle-CssClass="cssBorderGrv"
                    HeaderStyle-CssClass="cssBorderGrv" ItemStyle-HorizontalAlign="Center" />
            </Columns>
            <RowStyle CssClass="gvRowStyle" HorizontalAlign="Center" />
            <AlternatingRowStyle CssClass="gvAlternatingRowStyle" />
            <HeaderStyle CssClass="gvHeader" Wrap="false" />
        </asp:GridView>
    </div>
    <input type="hidden" id="hidProperties" runat="server" />
    <input type="hidden" runat="server" id="hidMethod" />

    <script language="javascript" type="text/javascript">
  
    function hrUpdateCatalogue(obj,IdD)
    {
      var CodeID='<%= Request.QueryString["CodeID"]%>';
        window.location.href="AddDownload.aspx?IdD="+ IdD+"&CodeID="+CodeID;
    }
    
    </script>

</asp:Content>
